package com.lazily.wrapper;


/**
 * @Author: GZQ
 * @date: 2025/3/3 21:02
 * @description: Integer 类面试题总结
 */

public class WrapperExercise03 {
	// 程序入口
	public static void main(String[] args) {
		Integer i1 = new Integer(127);
		Integer i2 = new Integer(127);
		System.out.println(i1 == i2); // f

		Integer li3 = new Integer(128);
		Integer li4 = new Integer(128);
		System.out.println(li3 == li4); // f

		Integer li5 = 127;
		Integer li6 = 127;
		System.out.println(li5 == li6); // t

		Integer i7 = 128;
		Integer i8 = 128;
		System.out.println(i7 == i8); // f

		Integer i9 = 127;
		Integer i10 = new Integer(127);
		System.out.println(i9 == i10); // f

		// 只要基本数据类型，判断的是值是否相等
		Integer i11 = 127;
		int i12 = 127;
		System.out.println(i11 == i12); // t

		Integer i13 = 128;
		int i14 = 128;
		System.out.println(i13 == i14); // t
	}
}
